package com.lwl.office.dcconverter.element;

import cn.hutool.core.util.StrUtil;
import com.lwl.office.webeditor.ParserContext;
import lombok.Data;

/**
 * 图片
 */
@Data
public class DCPic extends AbsDCElement{
    private String url;
    @Override
    public String toHtml() {
        StringBuilder stb = new StringBuilder();
        if(StrUtil.isNotEmpty(url)){
            stb.append("<img src=\"").append(url).append("\"").append("/>");
        }
        return stb.toString();
    }

    @Override
    public void parseWord(ParserContext context) {

    }
}
